/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace OpenGado.DATA.Entities
{
	/// <summary>
	/// Contact object for NHibernate mapped table 'contact'.
	/// </summary>
	[Serializable]
	public class Contact
	{
		#region Member Variables
		protected int _contactid;
		protected string _contactname;
		protected string _contacttype;
		protected string _contactemail;
		protected Vendor _vendor;
		protected string _contactphone;
		protected string _contactmobile;
		protected string _contactpostaladdress;
		protected string _contactcity;
		protected string _contactcountry;
		protected string _contactremarks;
		#endregion
		#region Constructors
			
		public Contact() {}
					
		public Contact(string contactname, string contacttype, string contactemail, string contactphone, string contactmobile, string contactpostaladdress, string contactcity, string contactcountry, string contactremarks) 
		{
			this._contactname= contactname;
			this._contacttype= contacttype;
			this._contactemail= contactemail;
			this._contactphone= contactphone;
			this._contactmobile= contactmobile;
			this._contactpostaladdress= contactpostaladdress;
			this._contactcity= contactcity;
			this._contactcountry= contactcountry;
			this._contactremarks= contactremarks;
		}

		#endregion
		#region Public Properties
		public int Contactid
		{
			get { return _contactid; }
			set {_contactid= value; }
		}
		public string ContactName
		{
			get { return _contactname; }
			set {_contactname= value; }
		}
		public string ContactType
		{
			get { return _contacttype; }
			set {_contacttype= value; }
		}
		public string ContactEmail
		{
			get { return _contactemail; }
			set {_contactemail= value; }
		}
		public Vendor Vendor
		{
			get { return _vendor; }
			set {_vendor= value; }
		}
		public string ContactPhone
		{
			get { return _contactphone; }
			set {_contactphone= value; }
		}
		public string ContactMobile
		{
			get { return _contactmobile; }
			set {_contactmobile= value; }
		}
		public string ContactPostalAddress
		{
			get { return _contactpostaladdress; }
			set {_contactpostaladdress= value; }
		}
		public string ContactCity
		{
			get { return _contactcity; }
			set {_contactcity= value; }
		}
		public string ContactCountry
		{
			get { return _contactcountry; }
			set {_contactcountry= value; }
		}
		public string ContactRemarks
		{
			get { return _contactremarks; }
			set {_contactremarks= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Contact castObj = (Contact)obj;
			return ( castObj != null ) &&
			this._contactid == castObj.Contactid;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _contactid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
